/*
自己选择的路 ,跪着也要走完。朋友们 , 虽然这个世界日益浮躁起来,只
要能够为了当时纯粹的梦想和感动坚持努力下去 , 不管其它人怎么样,我
们也能够保持自己的本色走下去。
To the world , you will be a person , but to a person , you
will be the world .                               ——AKPower
*/
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string>
#include <stack>
#include <set>
#define IOS ios::sync_with_stdio(false), cin.tie(0)
using namespace std;
typedef long long ull;
typedef long long ll;
const ll maxn = 6e6;
ull pre1[maxn];
ull pre2[maxn];
void init()
{
    pre1[1] = 1;
    for (int i = 2; i < maxn; i++)
    {
        pre1[i] = pre1[i - 1] + i;
    }
    pre2[1] = 1;
    for (ll i = 2; i < maxn; i++)
    {
        pre2[i] = pre2[i - 1] + i * i;
    }
    return;
}
// bool vis[maxn];
// pair<ll, ll> ans[maxn];
struct node
{
    ll x, y;
    /* data */
} ans[maxn];

int main()
{
    IOS;
    ull x;
    init();
    while (cin >> x)
    {
        bool flag = false;
        if (x == 1)
        {
            cout << 1 << endl;
            cout << 1 << " " << 1 << endl;
            continue;
        }
        // memset(vis, false, sizeof(vis));
        ll id = 1;
        ans[0].x = 1;
        ans[0].y = x;
        ull m = x;
        // vis[1] = true;
        // vis[x]=
        for (ull n = 2; n * n < x; n++)
        {
            ull fz = x - pre2[n - 1] + pre1[n - 1] * n;
            ull fm = n * n - pre1[n - 1];
            // if (n == 4)
            // {
            //     cout << fz / fm << endl;
            // }
            // if (n <= 100)
            //     cout << n << " " << fz / fm << endl;
            if (fz < fm * n)
                break;
            if (fz % fm == 0)
            {
                m = fz / fm;
                if (m < n)
                {
                    break;
                }
                // vis[n] = true;
                // vis[m] = true;
                ans[id].x = n;
                ans[id].y = m;
                id++;
                // cout << n << " " << m << endl;
                if (n == m)
                {
                    flag = true;
                    break;
                }
            }
        }
        while (ans[id - 1].x > ans[id - 1].y)
            id--;
        if (flag)
            cout << id * 2 - 1 << endl;
        else
            cout << id * 2 << endl;
        for (ll i = 0; i < id; i++)
        {
            cout << ans[i].x << " " << ans[i].y << endl;
        }
        if (flag)
        {
            id--;
        }
        for (ll i = id - 1; i >= 0; i--)
        {
            cout << ans[i].y << " " << ans[i].x << endl;
        }
    }
    getchar();
    getchar();
    return 0;
}
